package com.vrv.common.resolver.dispatcher;

import java.util.Arrays;

import com.vrv.common.resolver.RequestParameter;
import com.vrv.common.resolver.Response;

/**
 * content://com.vrv.sqlite/dbname
 *
 * @author 曹保利
 *
 */
public class LocalityRequestHandler implements RequestState {

    @Override
    public Response handler(DbType dbType, RequestParameter parameter, String[] detailKeys) {
        String uri = parameter.getUrl();
        String columns = Arrays.toString(detailKeys).replace("[", "").replace("]", "").replace("_", ".");
        String table = uri.substring(uri.lastIndexOf("/")+1);
        String sql = "SELECT " + columns + " FROM "+table+" WHERE 1=1 LIMIT " + parameter.getPageSize() + " OFFSET " + (parameter.getPageSize() * (parameter.getPageNumber() + 1));
        return null;
    }

}
